
export const optionBar = {
  chart: {
    type: 'column',
    backgroundColor: null
  },
  credits: {
    enabled: false
  },
  title: {
    text: null
  },
  xAxis: {
    gridLineColor: '#3C6A94',
    gridLineWidth: 2,
    categories: ['一般单位', '地下建筑', '高层建筑', '化工企业', '重点单位'],
    labels: {
      style: {
        color: '#ccc',
        fontSize: '28px'
      }
    }
  },
  yAxis: {
    min: 0,
    title: {
      text: null
    },
    gridLineColor: '#3C6A94',
    tickAmount: 4,
    labels: {
      style: {
        color: '#ccc',
        fontSize: '28px'
      }
    }
  },
  legend: {
    verticalAlign: 'top',
    y: -20,
    itemStyle: {
      color: ' #CBEAFF',
      fontSize: 23
    },
    itemHoverStyle: {
      color: '#fff'
    }
  },
  tooltip: {
    formatter() {
      return `
        <b>${this.x}</b><br/>
        ${this.series.name}：${this.y}万元<br/>
        总量：${this.point.stackTotal}万元<br/>
      `
    },
    backgroundColor: 'rgba(0,0,0,0.5)',
    style: {
      padding: 10,
      fontWeight: 'bold',
      fontSize: 24,
      color: '#fff'
    }
  },
  plotOptions: {
    column: {
      stacking: 'normal'
    }
  },
  series: [{
    name: '死亡',
    data: [5, 3, 4, 7, 2]
  }, {
    name: '重伤',
    data: [2, 2, 3, 2, 1]
  }, {
    name: '轻伤',
    data: [3, 4, 4, 2, 5]
  }]
}
